package com.noahplat.user.mapper;

import com.noahplat.user.pojo.RoleMenu;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Set;

/**
 * 权限菜单栏中间表关系映射
 *
 * @author 李东
 * @version 1.0.0
 * @Date: 2021/2/27 13:40
 **/
public interface RoleMenuMapper extends Mapper<RoleMenu> {
    @Insert("<script> INSERT INTO tb_role_menu(acctid,rid,mid) VALUES <foreach collection = 'mid' item='record' separator=','>" +
            "(#{acctid},#{rid},#{record})</foreach></script>")
    int insertRoleMenu( @Param("acctid") Long acctid,@Param("rid") Long rid,@Param("mid") Set<Long> mid);
}
